#ifndef FOODORDERTABLE_H
#define FOODORDERTABLE_H

#include "Food.h"
#include "User.h"
#include "FoodOrder.h"

#include <QObject>
#include <QSqlError>
#include <QSqlDatabase>
#include <QSqlQuery>
#include <QString>
#include <QDebug>

class FoodOrderTable : public QObject
{
    Q_OBJECT
public:
    explicit FoodOrderTable(QObject *parent = nullptr);
    void createFoodOrderTable();    //建表
    void insertFoodOrder(FoodOrder food_order);    //插入新订单
    FoodOrder* queryAllFoodOrder();   //查询所有的订单
    FoodOrder queryFoodOrderById(int id);   //根据id查询订单
    FoodOrder* queryFoodOrderByAccount(QString account);    //根据账户查订单
    void deleteFoodOrder(int id);   //删除订单

signals:

};

#endif // FOODORDERTABLE_H
